﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using ContractManagermentSystem.DataAccess;
using ContractManagermentSystem.Entity;

namespace ContractManagermentSystem.Business
{
    public class ContractorBus
    {
        private readonly ContractorDao _contractorDao;

        public ContractorBus()
        {
            _contractorDao = new ContractorDao();
        }

        public DataTable LoadAllContractor()
        {
            return _contractorDao.LoadAllContractor();
        }

        public int CheckUserName(string userName)
        {
            return _contractorDao.CheckUserName(userName);
        }

        public DataTable GetContractorByContractorId(Guid contractorId)
        {
            return _contractorDao.GetContractorByContractorId(contractorId);
        }

        public void CreateContractor(Contractor contractor)
        {
            _contractorDao.CreateContractor(contractor);
        }

        public void UpdateContractor(Contractor contractor)
        {
            _contractorDao.UpdateContractor(contractor);
        }
    }
}
